/*
 * types.h
 *
 *  Created on: 2015年3月9日
 *      Author: yimi
 */

#ifndef TYPES_H_
#define TYPES_H_

#include "hack.h"

#define PACKED __attribute__ ((packed))

#define SECTION(name) 	__attribute__ ((section(name)))
#define NORETURN		__attribute__((noreturn))
#define WEAK			__attribute__((weak))
#define ALIAS(name)     __attribute__((alias(name)))

#define HACK_SYM(section_name)  __attribute__((unused,section(section_name)))

#define sub(a)		((func)(0x##a + 1))


#define ALIGNED(v) __attribute__ ((aligned (v)))

typedef unsigned char 	u8;
typedef unsigned short	u16;
typedef unsigned int	u32;

typedef signed char 	s8;
typedef signed short	s16;
typedef signed int		s32;

typedef const u8*   const_u8ptr;
typedef const u16*  const_u16ptr;
typedef const u32*  const_u32ptr;

typedef volatile u8	vu8;
typedef volatile u16	vu16;
typedef volatile u32	vu32;

typedef volatile s8		vs8;
typedef volatile s16	vs16;
typedef volatile s32	vs32;


#endif /* TYPES_H_ */
